<template>
  <div class="not-found">
    <h1>404</h1>
    <p>页面不存在</p>
    <a-button type="primary" @click="router.replace('/')">返回首页</a-button>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router'

const router = useRouter()
</script>

<style lang="scss" scoped>
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  text-align: center;

  h1 {
    font-size: 6rem;
    margin-bottom: 1rem;
    color: #e74c3c;
  }

  p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #7f8c8d;
  }

  a {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    transition: background-color 0.3s;

    &:hover {
      background-color: #2980b9;
    }
  }
}
</style>
